#include <math.h>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

namespace BaiDuStar
{
	int star_2013_0110_02()
	{
		//double a = 0.1 , b = 0.9 ;
		//double e = 0;
		//for (int i = 1 ; i <= 9 ; i++)
		//{
		//	e += i * a * pow(b,i-1);
		//	cout<<i<<"--"<<e<<endl;
		//}
		//e += 10 * pow(0.9,9);

		double a = 0.13 , b = 1-a ;
		double e = 0;
		for (int i = 1 ; i <= 7 ; i++)
		{
			e += i * a * pow(b,i-1);
			cout<<i<<"--"<<e<<endl;
		}
		e += 8 * pow(b,7);
		cout<<e<<endl;
		int k = 9;
		for (int i = 1 ; i <= k-1 ; i++)
		{
			e += i * a * pow(b,i-1);
			cout<<i<<"--"<<e<<endl;
		}
		e += k * pow(b,k-1);
		cout<<e<<endl;
		return 0;
	}
}

